<?php
/**
 * 系統名稱: Lotto 系統
 * 檔案說明: 專案管理-修改
 * $Author$
 * $Id$
 *
 */
set_time_limit(0);
include_once("../../config.inc.php");

session_start();
$_LangPath = "realsupplement";
$strTemplatePath = __Admintemplate_Path."/RealSupplement/";
include_once(__Language_Path."/selectlanguage_admin.php");
include_once(__Modules_Path."/LogRecord.lib.php");
include_once(__Modules_Path."/Gamble.lib.php");
include_once(__Common_Path."/SysParam.inc.php");
include_once(__Modules_Path."/ChangeTime.lib.php");
include_once(__Common_Path."/Lotto.inc.php");

$arrPower = CheckUsePower("realsupplement");
if($arrPower === false)ErrMsgOutputHTML("Error", "", 1);


if(empty($_SESSION["Admin_Info"] -> GameType))$_SESSION["Admin_Info"] -> GameType = $_KSysParam[GamblePreLine];
if($_data["ChangeGameType"] == "Yes"){
	$_SESSION["Admin_Info"] -> GameType = $_data["GameType"];
}
//$_data["GameType"] = ($_data["isGetSuppleOdds"] == "Y")?1:$_SESSION["Admin_Info"] -> GameType;
$_data["GameType"] = 1;

$intLottoID = (int)$_data["LottoID"];
if(empty($intLottoID))$intLottoID = 1;	// 暫訂只有 香港六合彩
$arrLotto = $_arrLotto[$intLottoID];
$intLType = (int)$arrLotto["LType"];
$data = $_data["data"];

switch($_data["op"]){
	case "Wager":		//補貨下注
		include_once(__Admin_Path."/logincheck.php");
		include_once(__Modules_Path."/Wager.lib.php");
		include_once(__Modules_Path."/WagerForm.lib.php");
		include_once(__Modules_Path."/joinnumber.lib.php");
		@include_once(__Common_Path."/betparam/BetParam_".$intLottoID.".inc.php");
		include_once("Wager.php");
		include_once("GetOdds.php");
		break;

	case "MultiWager":		//多號碼補貨下注
		include_once(__Admin_Path."/logincheck.php");
		include_once(__Modules_Path."/Wager.lib.php");
		include_once(__Modules_Path."/WagerForm.lib.php");
		include_once(__Modules_Path."/joinnumber.lib.php");
		@include_once(__Common_Path."/betparam/BetParam_".$intLottoID.".inc.php");
		include_once("MultiWager.php");
		include_once("GetOdds.php");
		break;

	case "GetOdds":				//抓取賠率
		include_once(__Admin_Path."/logincheck.php");
		include_once(__Modules_Path."/joinnumber.lib.php");
		include_once(__Common_Path."/gambletype/GambleType".$_data["GameType"]."_".$intLottoID.".inc.php");
		include_once("GetOdds.php");
		break;

	case "GetTemplate":		//取得樣版
		include(__Common_Path."/betparam/AnimalsParams_".$intLottoID.".inc.php");
		include_once("GetTemplate.php");
		break;

	default:								//顯示操盤表
		include_once(__Admin_Path."/logincheck.php");
		include_once(__Modules_Path."/Lotto.lib.php");
		@include_once(__Common_Path."/betparam/BetParam_".$intLottoID.".inc.php");
		include_once("List.php");
		break;
}
@mysql_close($$_Conn);
?>